<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:if test="asks.size%3==0">
	<s:set name="colCount" value="asks.size/3"></s:set>
</s:if>
<s:else>
	<s:set name="colCount" value="asks.size/3+1"></s:set>
</s:else>
<s:iterator id="ask" value="asks" status="askStatus">
	<s:if test="#askStatus.index%#colCount==0">
		<div class="stream-col">
	</s:if>
      <div id='ask_<s:property value="#ask.id"/>' class="stream-one yoask" askId='<s:property value="#ask.id"/>' userId='<s:property value="#ask.userId"/>'>
        <div class="stream-one-inner"> <a href="javascript:" class="stream-refresh hover" title="refresh"><i></i></a>
          <div class="stream-stats">
            <p class="stream-stat-answers">
            	<a href="javascript:"><span><s:property value="#ask.commentCount"/></span> 评论</a>
            </p>
            <p class="stream-stat-likes">
            	<span class="stream-like-count"><s:property value="#ask.likeCount"/></span>喜欢 
            	<a title="点击去喜欢她" href="javascript:">喜欢</a>
            </p>
          </div>
          <div class="stream-question">
            <h2> <a title="点击查看信息详情！" href="javascript:"><s:property value="#ask.question"/></a></h2>
          </div>
          <div class="stream-context">
            <p class="stream-context-image"> <a class="askImg" href='http://www.yoasking.com/a/<s:property value="#ask.id"/>' title="点击查看信息详情！" alt="点击查看信息详情！"><img src='<s:property value="#ask.picPath"/>!middle' title="问题图片！" alt="问题图片！" /></a> </p>
          </div>
          <div class="stream-answer-area">
          	<div class="stream-answer-inner">
                <div class="stream-expander">
                  <textarea class="txt"></textarea>
                  <div class="txt_count" style="display: block;"> <span class="curSize">0</span> / <strong class="maxSize">35</strong> </div>
                  <span class="defaultT">表态</span>
                </div>
                <div class="stream-status-undefined">
                  <ul class="stream-options">
                  <s:iterator id="answer" value="#ask.answerList">
                  		<s:if test="#ask.isAnswer">
	                  		<s:if test="#answer.isAnswer">
	                    		<li class="stream-my-answer">
			                    	<a class="stream-vote-trigger"  answerId='<s:property value="#answer.id"/>'> 
			                        	<span class="stream-option-text"><s:property value="#answer.answerBody"/></span> 
			                            <span class="stream-option-bar-container">
			                            	<span class="stream-option-bar" voteRate='<s:property value="#answer.voteRate"/>' style="width:0%;">&nbsp;</span> 
			                                <span class="stream-option-info">
			                                	<span class="stream-vote-count"><s:property value="#answer.voteCount"/></span>
			                                    <span class="stream-percentage"><span><s:property value="#answer.voteRate"/>%</span></span>
			                                </span> 
			                            </span> 
			                         </a> 
			                     </li>
			                </s:if>
	                    	<s:else>
	                    		<li> 
			                    	<a class="stream-vote-trigger" href="###" answerId='<s:property value="#answer.id"/>'> 
			                        	<span class="stream-option-text"><s:property value="#answer.answerBody"/></span> 
			                            <span class="stream-option-bar-container"> 
			                            	<span class="stream-option-bar" voteRate='<s:property value="#answer.voteRate"/>' style="width:0%;">&nbsp;</span>
			                            	<span class="stream-option-info"> 
			                                	<span class="stream-vote-count"><s:property value="#answer.voteCount"/></span>
			                                    <span class="stream-percentage"><span><s:property value="#answer.voteRate"/>%</span></span>
			                                </span>
			                            </span> 
			                         </a> 
			                     </li>
	                    	</s:else>
	                    </s:if>
                  		<s:else>
                  			<li> 
		                    	<a class="stream-vote-trigger" href="###" answerId='<s:property value="#answer.id"/>'> 
		                        	<span class="stream-option-text"><s:property value="#answer.answerBody"/></span> 
		                            <span class="stream-option-bar-container"> 
		                            	<span class="stream-option-bar" style="width:20%;">投票</span> 
		                            </span> 
		                         </a> 
		                     </li>
                  		</s:else>
                  </s:iterator>
                  </ul>
                </div>
                <!--
                <p class="stream-has-other"> <a href="javascript:">+ 2 other answers</a> </p>
                -->
            </div>
            <dl class="stream-reason-avatar"> 
                <dt>
                    <a href="http://www.yoasking.com/user/<s:property value="#ask.userId"/>"><img src='<s:property value="#ask.avatarPath"/>!small' onerror="http://yoasking.com/img/face.jpg"/></a> 
                	<div class="ownerInfo">
	                	<span class="arrow"></span>
	                	<a href="http://www.yoasking.com/user/<s:property value="#ask.userId"/>"><img class="ownerPhoto" src='<s:property value="#ask.avatarPath"/>!small'/></a>
	                	<p><em><s:property value="#ask.userName"/></em></p>
						<p class="name"><s:property value="#ask.userName"/></p>
	                	<a href="javascript:" class="follow" id="myFollow">关注</a>
	                </div>
                </dt>
                <dd class="owner"> 
                    <a href="http://www.yoasking.com/user/<s:property value="#ask.userId"/>"><s:property value="#ask.userName"/></a>
                    <a href="javascript:"></a> 
                </dd> 
            </dl> 
            <a class="stream-hide" title="隐藏此信息！" href="javascript:"> <i class="icon-remove">×</i>隐藏</a> </div>
        </div>
      </div>
    <s:if test="(#askStatus.index+1)%#colCount==0||#askStatus.last">
		</div>
	</s:if>
</s:iterator>